<?php

chdir(dirname(__DIR__));

if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) {
    return false;
}

defined('ENV') || define('ENV', 'local');

date_default_timezone_set('Asia/Shanghai');

//加载自动导入系统
require dirname(__DIR__) . '/baseVendor/core/autoload/initAutoload.php';
//加载第三方库自动导入系统
require dirname(__DIR__) . '/vendor/autoload.php';

//进行分发
\core\init\init::loadControllerAndAction();
